﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<PagedList<CourseSystem.Core.Entities.StudentInfo>>" %>
<%@ Import Namespace="Chowpoo.Util" %>
<%@ Import Namespace="CourseSystem.Core.BLL" %>
<%@ Import Namespace="CourseSystem.Core.Enum" %>
<%@ Import Namespace="Webdiyer.WebControls.Mvc" %>
<% var hours = CourseSettingBLL.Get().StudentHours;
   var zuoye = ExaminationBLL.GetTypeCount(1);
%>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="table03">
    <tr class="box06">
        <td width="11%" height="31" align="center">
            学生学号
        </td>
        <td width="9%" align="center">
            学生姓名
        </td>
        <td width="15%" align="center">
            院校
        </td>
        <td width="9%" align="center">
            专业
        </td>
        <td width="5%" align="center">
            年级
        </td>
        <td width="7%" align="center">
            提问数
        </td>
        <td width="7%" align="center">
            发帖数
        </td>
        <td width="7%" align="center">
            完成作业数
        </td>
        <td width="7%" align="center">
            完成作业比例
        </td>
        <td width="9%" align="center">
            总在线学时
        </td>
        <td width="10%" align="center">
            占课程总学时比例
        </td>
    </tr>
    <% int i = 1;

       foreach (var item in Model)
       {
           if (i++ % 2 != 0)
           {%>
    <tr class="box01">
        <%}
           else
           { %>
        <tr class="box02" onmouseover="this.className='bg3'" onmouseout="this.className='bg4'"
            bgcolor="#FFFFFF">
            <%} %>
            <td height="27" align="center">
                <%=item.Uid %>
            </td>
            <td align="center">
                <%=item.StuName %>
            </td>
            <td align="center">
                <%=item.ClassInfo.SubjectInfo.DepartmentInfo.CollegeInfo.Name%>
            </td>
            <td align="center">
                <%=item.ClassInfo.SubjectInfo.Name%>
            </td>
            <td align="center">
                <%=item.GradeYearInfo.Year%>级
            </td>
            <td align="center">
                <%=QuestionBLL.GetAskCount(item.Id) %>
            </td>
            <td align="center">
                <%=PostsBLL.GetPostCount(item.Id)%>
            </td>
            <td align="center">
                <% var thisZuoye = ExamSummaryBLL.GetTypeCount(item.Id, 1);%>
                <%=thisZuoye %>
            </td>
            <td align="center">
                <%=thisZuoye.DivisionStr(zuoye)%>
            </td>
            <td align="center">
                <%=item.OnlineTime/60%>
            </td>
            <td align="center">
                <%=(item.OnlineTime / 60).DivisionStr(hours)%>
            </td>
        </tr>
        <%} %>
</table>
<table width="98%" height="7" border="0" align="center" cellpadding="0" cellspacing="0"
    bordercolor="#FFFFFF">
    <tr>
        <td class="gray12">
            &nbsp;
        </td>
        <td align="right" class="gray12">
            <%=Html.AjaxPager(Model, new PagerOptions() { ContainerTagName = "span", CssClass = "mvcPager", PageIndexParameterName = "pid", ShowMorePagerItems = false, AlwaysShowFirstLastPageNumber = true, }, new AjaxOptions() { UpdateTargetId = "listDiv" })%>
            共<%=Model.TotalItemCount %>条记录，页<%=Model.CurrentPageIndex %>/<%=Model.TotalPageCount %>
        </td>
    </tr>
</table>
